import { createRouter, createWebHashHistory } from "vue-router";
import home from "@/views/shouye.vue"
import shopping from "@/views/gwc.vue"
import classify from "@/views/fenlei.vue"
import My from "@/views/My.vue"
import xiangQing from "@/views/xiangQing.vue"
import home_sp from "@/views/shouye_sp.vue";
import classify_sp from "@/views/fenleishangpin.vue";
const router = createRouter({
    history: createWebHashHistory(),
    routes: [
        {
            path: "/",
            redirect: "/home"
        },
        {
            path: "/home",
            component: home,
            children: [
                {
                    path: "",
                    // name: "homesp",
                    redirect: "/home/home_sp"
                    // component: home_sp
                },
                {
                    path: "home_sp",
                    name: "home_sp",
                    // redirect: "/home"
                    component: home_sp
                }]
        },
        {
            path: "/shopping",
            component: shopping
        },
        {
            path: "/classify",
            component: classify,
            redirect: "/classify/classify_sp",
            children: [
                {
                    path: "classify_sp",
                    name: "classify_sp",
                    component: classify_sp
                    
                }
            ]
        },
        {
            path: "/My",
            component: My,
            name: "My",
            meta: {
                isShow: true
            }
           
        },
        {
            path: "/xiangQing",
            name: "xiangQing",
            component: xiangQing,
            meta: {
                isShow: true
            }

        },
    ]
})
export default router